<div class="layui-fluid">
    <div class="layui-row layui-col-space15">

        <div id="CarInfoCount" class="layui-col-xs12 layui-col-sm6 layui-col-md3" style="display: none;">
            <a id="CarInfoCountHref" href="#/main/car/mainCarInfo">
                <div class="layui-card">
                    <div class="layui-card-header">
                        配车提醒<span class="layui-badge layui-bg-blue pull-right">个</span>
                    </div>
                    <div class="layui-card-body">
                        <p class="lay-big-font" id="CarInfoCountInfo"></p>
                        <p>总计配车申请数量<span class="pull-right" id="CarInfoCountAll"></span></p>
                    </div>
                </div>
            </a>
        </div>

        <div id="IllegalCount" class="layui-col-xs12 layui-col-sm6 layui-col-md3" style="display: none;">
            <a id="IllegalCountHref" href="#/main/car/mainCarInfo">
                <div class="layui-card">
                    <div class="layui-card-header">
                        违章提醒<span class="layui-badge layui-bg-blue pull-right">条</span>
                    </div>
                    <div class="layui-card-body">
                        <p class="lay-big-font" id="IllegalCountInfo"></p>
                        <p>总计违章数量<span class="pull-right" id="IllegalCountAll"></span></p>
                    </div>
                </div>
             </a>
        </div>
   
        <div id="insuranceCount" class="layui-col-xs12 layui-col-sm6 layui-col-md3" style="display: none;">
            <a id="insuranceCountHref" href="#/main/car/mainCarInfo">
                <div class="layui-card">
                    <div class="layui-card-header">
                        保险提醒<span class="layui-badge layui-bg-black pull-right">台</span>
                    </div>
                    <div class="layui-card-body">
                        <p class="lay-big-font" id="insuranceCountInfo"></p>
                        <p>总计保险到期车辆数量<span class="pull-right" id="insuranceCountAll"></span></p>
                    </div>
                </div>
            </a>
        </div>

        <div id="annualCount" class="layui-col-xs12 layui-col-sm6 layui-col-md3" style="display: none;">
            <a id="annualCountHref" href="#/main/car/mainCarInfo">
                <div class="layui-card">
                    <div class="layui-card-header">
                        年审提醒<span class="layui-badge layui-bg-green pull-right">台</span>
                    </div>
                    <div class="layui-card-body">
                        <p class="lay-big-font" id="annualCountInfo"></p>
                        <p>总计年审到期车辆数量<span class="pull-right" id="annualCountAll"></span></p>
                    </div>
                </div>
            </a>
        </div>

        <div id="invoiceAuditingCount" class="layui-col-xs12 layui-col-sm6 layui-col-md3" style="display: none;">
            <a id="invoiceAuditingCountHref" href="#/main/financialManage/mainFinanMent">
                <div class="layui-card">
                    <div class="layui-card-header">
                        单据提醒<span class="layui-badge layui-bg-orange pull-right">单</span>
                    </div>
                    <div class="layui-card-body">
                        <p class="lay-big-font" id="InvoiceAuditingCountInfo"></p>
                        <p>总计单据数量<span class="pull-right" id="InvoiceAuditingCountAll"></span></p>
                    </div>
                </div>
            </a>
        </div>
    </div>
</div>


<!-- 主页 正文开始 -->
<div class="layui-card-body" style="text-align: center;">
    <h2 style="margin-top: 40px;margin-bottom: 20px;font-size: 28px;color: #91ADDC;" id="index_compangName_h2">欢迎使用亚诺广告有限公司管理系统!</h2>
    <img src="assets/images/welcome.png" style="max-width: 100%;">
</div>

<style type="text/css">
    .btn-the-custom .layui-layer-btn .layui-layer-btn0{
        background-color:#393d49;
        border-color:#393d49;
    }

</style>

<!-- js部分 -->
<script>
    layui.use(['layer'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
    });

    layui.use(['reqApi','promiseReq','setter','index','reqEnum'], function () {
        var $ = layui.jquery;
        var setter = layui.setter;
        var promiseReq = layui.promiseReq;
        var reqApi = layui.reqApi;
        var reqEnum = layui.reqEnum;
        var openNew = layui.index;

        // var notice = function(){
        //     var infoReq = promiseReq.req({
        //         headers: {Authorization: setter.getBearerToken()},
        //         url: reqApi.admin.home.get.restfulFormat({id: setter.getUserId()})
        //         , success: function (rs) {
                    
        //             //配车提醒
        //             if('' !== rs.data.CarInfoCount && null !== rs.data.CarInfoCount && undefined !== rs.data.CarInfoCount){
        //                 $('#CarInfoCount').removeAttr("style","");
        //                 if(reqEnum.sysUserType.FINANCIAL === setter.getUser().type){
        //                     setter.putParameter('FINANCIAL','show');
        //                     $("#CarInfoCountHref").attr("href","#/main/financialManage/mainVehicleAudit"); 
        //                 }else{
        //                     if(reqEnum.sysUserType.SALESMANAGER === setter.getUser().type || reqEnum.sysUserType.DIRECTOROFSALES === setter.getUser().type){
        //                         setter.putParameter('listMainCarTabFour','show');
        //                     }else if(reqEnum.sysUserType.CHEGUANDIRECTOR === setter.getUser().type){
        //                         setter.putParameter('listMainCarTabFive','show');
        //                     }else if(''===setter.getUser().type || null===setter.getUser().type || undefined===setter.getUser().type || reqEnum.sysUserType.SUPER_ADMIN === setter.getUser().type){
        //                         setter.putParameter('SUPERADMIN','show');
        //                     }
        //                 }
        //                 $('#CarInfoCountInfo').html(rs.data.CarInfoCount+'个');
        //                 $('#CarInfoCountAll').html(rs.data.CarInfoCount+'个');
        //             }

        //             //违章提醒
        //             if('' !== rs.data.IllegalCount && null !== rs.data.IllegalCount && undefined !== rs.data.IllegalCount){
        //                 setter.putParameter('IllegalTab','show');
        //                 $('#IllegalCount').removeAttr("style","");
        //                 $('#IllegalCountInfo').html(rs.data.IllegalCount+'条');
        //                 $('#IllegalCountAll').html(rs.data.IllegalCount+'条');
        //             }

        //             //保险提醒
        //             if('' !== rs.data.insuranceCount && null !== rs.data.insuranceCount && undefined !== rs.data.insuranceCount){
        //                 setter.putParameter('insuranceTab','show');
        //                 $('#insuranceCount').removeAttr("style","");
        //                 $('#insuranceCountInfo').html(rs.data.insuranceCount+'台');
        //                 $('#insuranceCountAll').html(rs.data.insuranceCount+'台');
        //             }

        //             //年审提醒
        //             if('' !== rs.data.annualCount && null !== rs.data.annualCount && undefined !== rs.data.annualCount){
        //                 setter.putParameter('annualTab','show');
        //                 $('#annualCount').removeAttr("style","");
        //                 $('#annualCountInfo').html(rs.data.annualCount+'台');
        //                 $('#annualCountAll').html(rs.data.annualCount+'台');
        //             }

        //             //单据提醒
        //             if('' !== rs.data.invoiceAuditingCount && null !== rs.data.invoiceAuditingCount && undefined !== rs.data.invoiceAuditingCount){
        //                 $('#invoiceAuditingCount').removeAttr("style","");
        //                 $('#InvoiceAuditingCountInfo').html(rs.data.invoiceAuditingCount+'单');
        //                 $('#InvoiceAuditingCountAll').html(rs.data.invoiceAuditingCount+'单');
        //             }
        //         }
        //     });
            
        // }
        // notice();


        // //点击配车提醒触发
        // $(document).on("click","#CarInfoCountHref",function(){
        //   setter.putParameter('CarInfo','show');
        // });

        // //点击违章提醒触发
        // $(document).on("click","#IllegalCountHref",function(){
        //   setter.putParameter('Illegal','show');
        // });
        
        // //点击保险提醒触发
        // $(document).on("click","#insuranceCountHref",function(){
        //   setter.putParameter('insurance','show');
        // });

        // //点击年审提醒触发
        // $(document).on("click","#annualCountHref",function(){
        //   setter.putParameter('annual','show');
        // });

        // if('' != setter.getUser().companyId && null != setter.getUser().companyId && undefined != setter.getUser().companyId){
        //     var infoReq = promiseReq.req({
        //         headers: {Authorization: setter.getBearerToken()},
        //         url: reqApi.admin.mainCompany.get.restfulFormat({id: setter.getUser().companyId})
        //         , success: function (rs) {
        //             var data = rs.data;
        //             if('' != data.companyName && null != data.companyName && undefined != data.companyName) {
        //                 $('#index_compangName_footer').html("copyright © 2019 "+data.companyName+" all rights reserved.");
        //                 $('#index_compangName_h2').html("欢迎使用"+data.companyName+"管理系统!");
        //                 $('#index_compangName_head').html(data.companyName);
        //                 $('#index_compangName_title').html("&nbsp;管理中心");
        //             }
        //         }
        //     });
        // }

        // if(setter.getParameter().lock_remind){
        //     //控制每次登陆只提醒一次
        //     setter.removeParameter('lock_remind');
        //     var notice = function(){
        //         if('' != setter.getUser().companyId && null != setter.getUser().companyId && undefined != setter.getUser().companyId
        //         && (reqEnum.sysUserType.SALESCHANNEL === setter.getUser().type || reqEnum.sysUserType.STORESALES === setter.getUser().type
        //             || reqEnum.sysUserType.SALESMANAGER === setter.getUser().type || reqEnum.sysUserType.DIRECTOROFSALES === setter.getUser().type
        //             || reqEnum.sysUserType.CHEGUANDIRECTOR === setter.getUser().type)){
        //             var infoReq = promiseReq.req({
        //                 headers: {Authorization: setter.getBearerToken()},
        //                 url: reqApi.admin.home.get.restfulFormat({id: setter.getUserId()})
        //                 , success: function (rs) {
        //                     if (rs.data.content) {
        //                         //示范一个公告层
        //                         layer.open({
        //                             type: 1,
        //                             title: false ,//不显示标题栏
        //                             closeBtn: false,
        //                             area: '300px;',
        //                             shade: 0.8,
        //                             skin: 'btn-the-custom',
        //                             id: 'LAY_layuipronotice', //设定一个id，防止重复弹出
        //                             btn: ['火速前往', '关闭提醒'],
        //                             btnAlign: 'c',
        //                             moveType: 1, //拖拽模式，0或者1
        //                             content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">'+rs.data.content+'</div>',
        //                             yes: function(index, layero){
        //                                 setter.putParameter(rs.data.key,rs.data.value);
        //                                 openNew.go(rs.data.url);
        //                                 layer.close(index);
        //                             },error: function(layero){
        //                                 layer.close(layero);
        //                             }
        //                         });
        //                     }
        //                 }
        //             });
        //         }
        //     }
        //     notice();
        // }
    });
</script>

<!-- <style>
    /** 卡片轮播图样式 */
    .admin-carousel .layui-carousel-ind {
        position: absolute;
        top: -41px;
        text-align: right;
    }

    .admin-carousel .layui-carousel-ind ul {
        background: 0 0;
    }

    .admin-carousel .layui-carousel-ind li {
        background-color: #e2e2e2;
    }

    .admin-carousel .layui-carousel-ind li.layui-this {
        background-color: #999;
    }

    /** 广告位轮播图 */
    .admin-news .layui-carousel-ind {
        height: 45px;
    }

    .admin-news a {
        display: block;
        line-height: 60px;
        text-align: center;
    }

</style>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    访问量<span class="layui-badge layui-bg-blue pull-right">周</span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">99,666</p>
                    <p>总计访问量（假的）<span class="pull-right">88万 <i class="layui-icon layui-icon-flag"></i></span></p>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    下载<span class="layui-badge layui-bg-black pull-right">月</span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">33,555</p>
                    <p>新下载（假的）<span class="pull-right">10% <i class="layui-icon">&#xe601</i></span></p>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    Start<span class="layui-badge layui-bg-green pull-right">周</span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">99,666</p>
                    <p>总Start数（假的）<span class="pull-right">88万 <i class="layui-icon layui-icon-rate"></i></span></p>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    活跃用户<span class="layui-badge layui-bg-orange pull-right">月</span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">66,666</p>
                    <p>最近一个月（假的）<span class="pull-right">15% <i class="layui-icon layui-icon-user"></i></span></p>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row layui-col-space15">
        <div class="layui-col-lg8 layui-col-md7">
            <div class="layui-card">
                <div class="layui-card-header">更新日志</div>
                <div class="layui-card-body">
                    <ul class="layui-timeline">
                        <li class="layui-timeline-item">
                            <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                            <div class="layui-timeline-content layui-text">
                                <h3 class="layui-timeline-title">
                                    V1.0
                                    <small>THINK 单页面框架</small>&emsp;
                                    <span class="layui-badge-rim">2019-05-22</span>
                                </h3>
                                <ul>
                                    <li>以 EasyWeb 为基础框架，进行修改，以下就是做出修改的位置</li>
                                    <li>index.html：将 main 作为模块进行引入（摈弃了在主页使用js引入的方式）</li>
                                    <li>main.js：引入了 reqApi（请求地址管理） ，promiseReq（异步回调ajax请求）
                                        ，reqEnum（后端字典） 自定义模块，整体都被替换以及修改了</li>
                                    <li>dtree.js，formSelects-v4.js，notice.js，step.js，steps.js，treetable.js,treeTable.js：
                                        在js中引入了所需的css，并设置了版本管理，关键字是（layui.link）</li>
                                    <li>treetable.css：修改了图标样式</li>
                                    <li>treetable.js：扩展了ajax的请求参数（17 - 25），解决了分页条的显示问题（72-73）</li>
                                    <li>admin.css：添加了样式（1321 - 1364）（5266 - 5306）</li>
                                    <li>admin.js：修改了 req 方法，并且添加了 req 的辅助方法（121 - 214），
                                        删除了 ajax 方法（215），修改了 logout 事件方法（521 - 541）</li>
                                    <li>setter.js：修改了部分参数，修改了 getUserAuths 方法（79 - 89），
                                        添加了 putParameter，getParameter,removeParameter 方法（59 - 78），
                                        添加了 getBearerToken，setTokenInHeader 方法（91 - 107），
                                        删除了 getAjaxHeaders，ajaxSuccessBefore 方法（75）</li>
                                    <li>修改了 components -> tpl 目录下的模板文件</li>
                                    <li>重新制定了 home ，login 界面（view -> home）</li>
                                    <li>新增 rbac 权限管理（view -> rbac）</li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="layui-col-lg4 layui-col-md5">
            <div class="layui-card">
                <div class="layui-card-header">前端框架</div>
                <div class="layui-card-body">
                    <table class="layui-table layui-text">
                        <colgroup>
                            <col width="100">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <td>基础框架</td>
                            <td><a href="http://www.layui.com/" target="_blank">layui-v2.4.5</a></td>
                        </tr>
                        <tr>
                            <td>前端框架</td>
                            <td>
                                <a href="https://easyweb.vip/index" target="_blank">EasyWeb</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="layui-card">
                <div class="layui-card-header">后台框架</div>
                <div class="layui-card-body">
                    <table class="layui-table layui-text">
                        <colgroup>
                            <col width="100">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <td>核心框架</td>
                            <td>Spring、Spring MVC、Spring Boot</td>
                        </tr>
                        <tr>
                            <td>持久层</td>
                            <td>MyBatis、Druid、<a href="http://mp.baomidou.com" target="_blank">MyBatis-Plus</a>
                            </td>
                        </tr>
                        <tr>
                            <td>权限框架</td>
                            <td>SpringSecurity、oAuth2.0</td>
                        </tr>
                        <tr>
                            <td>其他</td>
                            <td>IDEA(开发工具)、MySQL(数据库)</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use(['layer', 'carousel'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var carousel = layui.carousel;
        var device = layui.device;

        // 渲染轮播
        carousel.render({
            elem: '.layui-carousel',
            width: '100%',
            height: '60px',
            arrow: 'none',
            autoplay: true,
            trigger: device.ios || device.android ? 'click' : 'hover',
            anim: 'fade'
        });
    });
</script> -->